<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SoupMessageHeaders</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="libsoup Reference Manual">
<link rel="up" href="ch02.html" title="Core API">
<link rel="prev" href="SoupMessage.html" title="SoupMessage">
<link rel="next" href="SoupMessageBody.html" title="SoupMessageBody">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="SoupMessage.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libsoup Reference Manual</th>
<td><a accesskey="n" href="SoupMessageBody.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#SoupMessageHeaders.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#SoupMessageHeaders.description" class="shortcut">Description</a>
                   | 
                  <a href="#SoupMessageHeaders.object-hierarchy" class="shortcut">Object Hierarchy</a>
</td></tr>
</table>
<div class="refentry">
<a name="SoupMessageHeaders"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="SoupMessageHeaders.top_of_page"></a>SoupMessageHeaders</span></h2>
<p>SoupMessageHeaders — HTTP message headers</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="SoupMessageHeaders.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libsoup/soup.h&gt;

typedef             <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders">SoupMessageHeaders</a>;
enum                <a class="link" href="SoupMessageHeaders.html#SoupMessageHeadersType" title="enum SoupMessageHeadersType">SoupMessageHeadersType</a>;
<a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="returnvalue">SoupMessageHeaders</span></a> * <a class="link" href="SoupMessageHeaders.html#soup-message-headers-new" title="soup_message_headers_new ()">soup_message_headers_new</a>           (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html#SoupMessageHeadersType" title="enum SoupMessageHeadersType"><span class="type">SoupMessageHeadersType</span></a> type</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageHeaders.html#soup-message-headers-free" title="soup_message_headers_free ()">soup_message_headers_free</a>           (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="SoupMessageHeaders.html#soup-message-headers-append" title="soup_message_headers_append ()">soup_message_headers_append</a>         (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *value</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageHeaders.html#soup-message-headers-replace" title="soup_message_headers_replace ()">soup_message_headers_replace</a>        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *value</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageHeaders.html#soup-message-headers-remove" title="soup_message_headers_remove ()">soup_message_headers_remove</a>         (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageHeaders.html#soup-message-headers-clear" title="soup_message_headers_clear ()">soup_message_headers_clear</a>          (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageHeaders.html#soup-message-headers-clean-connection-headers" title="soup_message_headers_clean_connection_headers ()">soup_message_headers_clean_connection_headers</a>
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>);
const <span class="returnvalue">char</span> *        <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-one" title="soup_message_headers_get_one ()">soup_message_headers_get_one</a>        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
const <span class="returnvalue">char</span> *        <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-list" title="soup_message_headers_get_list ()">soup_message_headers_get_list</a>       (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
const <span class="returnvalue">char</span> *        <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get" title="soup_message_headers_get ()">soup_message_headers_get</a>            (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);

<span class="returnvalue">void</span>                (<a class="link" href="SoupMessageHeaders.html#SoupMessageHeadersForeachFunc" title="SoupMessageHeadersForeachFunc ()">*SoupMessageHeadersForeachFunc</a>)    (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *value</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageHeaders.html#soup-message-headers-foreach" title="soup_message_headers_foreach ()">soup_message_headers_foreach</a>        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessageHeaders.html#SoupMessageHeadersForeachFunc" title="SoupMessageHeadersForeachFunc ()"><span class="type">SoupMessageHeadersForeachFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);

                    <a class="link" href="SoupMessageHeaders.html#SoupMessageHeadersIter" title="SoupMessageHeadersIter">SoupMessageHeadersIter</a>;
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageHeaders.html#soup-message-headers-iter-init" title="soup_message_headers_iter_init ()">soup_message_headers_iter_init</a>      (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html#SoupMessageHeadersIter" title="SoupMessageHeadersIter"><span class="type">SoupMessageHeadersIter</span></a> *iter</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="SoupMessageHeaders.html#soup-message-headers-iter-next" title="soup_message_headers_iter_next ()">soup_message_headers_iter_next</a>      (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html#SoupMessageHeadersIter" title="SoupMessageHeadersIter"><span class="type">SoupMessageHeadersIter</span></a> *iter</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> **name</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> **value</code></em>);

enum                <a class="link" href="SoupMessageHeaders.html#SoupEncoding" title="enum SoupEncoding">SoupEncoding</a>;
<a class="link" href="SoupMessageHeaders.html#SoupEncoding" title="enum SoupEncoding"><span class="returnvalue">SoupEncoding</span></a>        <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-encoding" title="soup_message_headers_get_encoding ()">soup_message_headers_get_encoding</a>   (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageHeaders.html#soup-message-headers-set-encoding" title="soup_message_headers_set_encoding ()">soup_message_headers_set_encoding</a>   (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessageHeaders.html#SoupEncoding" title="enum SoupEncoding"><span class="type">SoupEncoding</span></a> encoding</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="returnvalue">goffset</span></a>             <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-content-length" title="soup_message_headers_get_content_length ()">soup_message_headers_get_content_length</a>
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageHeaders.html#soup-message-headers-set-content-length" title="soup_message_headers_set_content_length ()">soup_message_headers_set_content_length</a>
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> content_length</code></em>);

enum                <a class="link" href="SoupMessageHeaders.html#SoupExpectation" title="enum SoupExpectation">SoupExpectation</a>;
<a class="link" href="SoupMessageHeaders.html#SoupExpectation" title="enum SoupExpectation"><span class="returnvalue">SoupExpectation</span></a>     <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-expectations" title="soup_message_headers_get_expectations ()">soup_message_headers_get_expectations</a>
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageHeaders.html#soup-message-headers-set-expectations" title="soup_message_headers_set_expectations ()">soup_message_headers_set_expectations</a>
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessageHeaders.html#SoupExpectation" title="enum SoupExpectation"><span class="type">SoupExpectation</span></a> expectations</code></em>);

const <span class="returnvalue">char</span> *        <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-content-type" title="soup_message_headers_get_content_type ()">soup_message_headers_get_content_type</a>
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> **params</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageHeaders.html#soup-message-headers-set-content-type" title="soup_message_headers_set_content_type ()">soup_message_headers_set_content_type</a>
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *params</code></em>);

<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-content-disposition" title="soup_message_headers_get_content_disposition ()">soup_message_headers_get_content_disposition</a>
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> **disposition</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> **params</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageHeaders.html#soup-message-headers-set-content-disposition" title="soup_message_headers_set_content_disposition ()">soup_message_headers_set_content_disposition</a>
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *disposition</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *params</code></em>);

                    <a class="link" href="SoupMessageHeaders.html#SoupRange" title="SoupRange">SoupRange</a>;
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-ranges" title="soup_message_headers_get_ranges ()">soup_message_headers_get_ranges</a>     (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> total_length</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessageHeaders.html#SoupRange" title="SoupRange"><span class="type">SoupRange</span></a> **ranges</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> *length</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageHeaders.html#soup-message-headers-set-ranges" title="soup_message_headers_set_ranges ()">soup_message_headers_set_ranges</a>     (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessageHeaders.html#SoupRange" title="SoupRange"><span class="type">SoupRange</span></a> *ranges</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> length</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageHeaders.html#soup-message-headers-set-range" title="soup_message_headers_set_range ()">soup_message_headers_set_range</a>      (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> start</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> end</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageHeaders.html#soup-message-headers-free-ranges" title="soup_message_headers_free_ranges ()">soup_message_headers_free_ranges</a>    (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessageHeaders.html#SoupRange" title="SoupRange"><span class="type">SoupRange</span></a> *ranges</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-content-range" title="soup_message_headers_get_content_range ()">soup_message_headers_get_content_range</a>
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> *start</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> *end</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> *total_length</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupMessageHeaders.html#soup-message-headers-set-content-range" title="soup_message_headers_set_content_range ()">soup_message_headers_set_content_range</a>
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> start</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> end</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> total_length</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="SoupMessageHeaders.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  GBoxed
   +----SoupMessageHeaders
</pre>
</div>
<div class="refsect1">
<a name="SoupMessageHeaders.description"></a><h2>Description</h2>
<p>
<a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> represents the HTTP message headers associated
with a request or response.
</p>
</div>
<div class="refsect1">
<a name="SoupMessageHeaders.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="SoupMessageHeaders"></a><h3>SoupMessageHeaders</h3>
<pre class="programlisting">typedef struct SoupMessageHeaders SoupMessageHeaders;
</pre>
<p>
The HTTP message headers associated with a request or response.
</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupMessageHeadersType"></a><h3>enum SoupMessageHeadersType</h3>
<pre class="programlisting">typedef enum {
	SOUP_MESSAGE_HEADERS_REQUEST,
	SOUP_MESSAGE_HEADERS_RESPONSE,
	SOUP_MESSAGE_HEADERS_MULTIPART
} SoupMessageHeadersType;
</pre>
<p>
Value passed to <a class="link" href="SoupMessageHeaders.html#soup-message-headers-new" title="soup_message_headers_new ()"><code class="function">soup_message_headers_new()</code></a> to set certain default
behaviors.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="SOUP-MESSAGE-HEADERS-REQUEST:CAPS"></a><span class="term"><code class="literal">SOUP_MESSAGE_HEADERS_REQUEST</code></span></p></td>
<td>request headers
</td>
</tr>
<tr>
<td><p><a name="SOUP-MESSAGE-HEADERS-RESPONSE:CAPS"></a><span class="term"><code class="literal">SOUP_MESSAGE_HEADERS_RESPONSE</code></span></p></td>
<td>response headers
</td>
</tr>
<tr>
<td><p><a name="SOUP-MESSAGE-HEADERS-MULTIPART:CAPS"></a><span class="term"><code class="literal">SOUP_MESSAGE_HEADERS_MULTIPART</code></span></p></td>
<td>multipart body part headers
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-new"></a><h3>soup_message_headers_new ()</h3>
<pre class="programlisting"><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="returnvalue">SoupMessageHeaders</span></a> * soup_message_headers_new           (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html#SoupMessageHeadersType" title="enum SoupMessageHeadersType"><span class="type">SoupMessageHeadersType</span></a> type</code></em>);</pre>
<p>
Creates a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>. (<a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> does this
automatically for its own headers. You would only need to use this
method if you are manually parsing or generating message headers.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>the type of headers</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-free"></a><h3>soup_message_headers_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_message_headers_free           (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>);</pre>
<p>
Frees <em class="parameter"><code>hdrs</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-append"></a><h3>soup_message_headers_append ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_message_headers_append         (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *value</code></em>);</pre>
<p>
Appends a new header with name <em class="parameter"><code>name</code></em> and value <em class="parameter"><code>value</code></em> to <em class="parameter"><code>hdrs</code></em>. (If
there is an existing header with name <em class="parameter"><code>name</code></em>, then this creates a
second one, which is only allowed for list-valued headers; see also
<a class="link" href="SoupMessageHeaders.html#soup-message-headers-replace" title="soup_message_headers_replace ()"><code class="function">soup_message_headers_replace()</code></a>.)
</p>
<p>
The caller is expected to make sure that <em class="parameter"><code>name</code></em> and <em class="parameter"><code>value</code></em> are
syntactically correct.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the header name to add</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>the new value of <em class="parameter"><code>name</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-replace"></a><h3>soup_message_headers_replace ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_message_headers_replace        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *value</code></em>);</pre>
<p>
Replaces the value of the header <em class="parameter"><code>name</code></em> in <em class="parameter"><code>hdrs</code></em> with <em class="parameter"><code>value</code></em>. (See
also <a class="link" href="SoupMessageHeaders.html#soup-message-headers-append" title="soup_message_headers_append ()"><code class="function">soup_message_headers_append()</code></a>.)
</p>
<p>
The caller is expected to make sure that <em class="parameter"><code>name</code></em> and <em class="parameter"><code>value</code></em> are
syntactically correct.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the header name to replace</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>the new value of <em class="parameter"><code>name</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-remove"></a><h3>soup_message_headers_remove ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_message_headers_remove         (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
<p>
Removes <em class="parameter"><code>name</code></em> from <em class="parameter"><code>hdrs</code></em>. If there are multiple values for <em class="parameter"><code>name</code></em>,
they are all removed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the header name to remove</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-clear"></a><h3>soup_message_headers_clear ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_message_headers_clear          (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>);</pre>
<p>
Clears <em class="parameter"><code>hdrs</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-clean-connection-headers"></a><h3>soup_message_headers_clean_connection_headers ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_message_headers_clean_connection_headers
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>);</pre>
<p>
Removes all the headers listed in the Connection header.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.36</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-get-one"></a><h3>soup_message_headers_get_one ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        soup_message_headers_get_one        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
<p>
Gets the value of header <em class="parameter"><code>name</code></em> in <em class="parameter"><code>hdrs</code></em>. Use this for headers whose
values are <span class="emphasis"><em>not</em></span> comma-delimited lists, and
which therefore can only appear at most once in the headers. For
list-valued headers, use <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-list" title="soup_message_headers_get_list ()"><code class="function">soup_message_headers_get_list()</code></a>.
</p>
<p>
If <em class="parameter"><code>hdrs</code></em> does erroneously contain multiple copies of the header, it
is not defined which one will be returned. (Ideally, it will return
whichever one makes libsoup most compatible with other HTTP
implementations.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>header name</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the header's value or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not found.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26.1</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-get-list"></a><h3>soup_message_headers_get_list ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        soup_message_headers_get_list       (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
<p>
Gets the value of header <em class="parameter"><code>name</code></em> in <em class="parameter"><code>hdrs</code></em>. Use this for headers whose
values are comma-delimited lists, and which are therefore allowed
to appear multiple times in the headers. For non-list-valued
headers, use <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-one" title="soup_message_headers_get_one ()"><code class="function">soup_message_headers_get_one()</code></a>.
</p>
<p>
If <em class="parameter"><code>name</code></em> appears multiple times in <em class="parameter"><code>hdrs</code></em>,
<a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-list" title="soup_message_headers_get_list ()"><code class="function">soup_message_headers_get_list()</code></a> will concatenate all of the values
together, separated by commas. This is sometimes awkward to parse
(eg, WWW-Authenticate, Set-Cookie), but you have to be able to deal
with it anyway, because the HTTP spec explicitly states that this
transformation is allowed, and so an upstream proxy could do the
same thing.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>header name</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the header's value or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not found.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26.1</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-get"></a><h3>soup_message_headers_get ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        soup_message_headers_get            (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">soup_message_headers_get</code> is deprecated and should not be used in newly-written code. Use <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-one" title="soup_message_headers_get_one ()"><code class="function">soup_message_headers_get_one()</code></a> or
<a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-list" title="soup_message_headers_get_list ()"><code class="function">soup_message_headers_get_list()</code></a> instead.</p>
</div>
<p>
Gets the value of header <em class="parameter"><code>name</code></em> in <em class="parameter"><code>hdrs</code></em>.
</p>
<p>
This method was supposed to work correctly for both single-valued
and list-valued headers, but because some HTTP clients/servers
mistakenly send multiple copies of headers that are supposed to be
single-valued, it sometimes returns incorrect results. To fix this,
the methods <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-one" title="soup_message_headers_get_one ()"><code class="function">soup_message_headers_get_one()</code></a> and
<a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-list" title="soup_message_headers_get_list ()"><code class="function">soup_message_headers_get_list()</code></a> were introduced, so callers can
explicitly state which behavior they are expecting.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>header name</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>as with <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-list" title="soup_message_headers_get_list ()"><code class="function">soup_message_headers_get_list()</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupMessageHeadersForeachFunc"></a><h3>SoupMessageHeadersForeachFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*SoupMessageHeadersForeachFunc)    (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *value</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
The callback passed to <a class="link" href="SoupMessageHeaders.html#soup-message-headers-foreach" title="soup_message_headers_foreach ()"><code class="function">soup_message_headers_foreach()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the header name</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>the header value</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>the data passed to <a class="link" href="SoupMessageHeaders.html#soup-message-headers-foreach" title="soup_message_headers_foreach ()"><code class="function">soup_message_headers_foreach()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-foreach"></a><h3>soup_message_headers_foreach ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_message_headers_foreach        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessageHeaders.html#SoupMessageHeadersForeachFunc" title="SoupMessageHeadersForeachFunc ()"><span class="type">SoupMessageHeadersForeachFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Calls <em class="parameter"><code>func</code></em> once for each header value in <em class="parameter"><code>hdrs</code></em>.
</p>
<p>
Beware that unlike <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get" title="soup_message_headers_get ()"><code class="function">soup_message_headers_get()</code></a>, this processes the
headers in exactly the way they were added, rather than
concatenating multiple same-named headers into a single value.
(This is intentional; it ensures that if you call
<a class="link" href="SoupMessageHeaders.html#soup-message-headers-append" title="soup_message_headers_append ()"><code class="function">soup_message_headers_append()</code></a> multiple times with the same name,
then the I/O code will output multiple copies of the header when
sending the message to the remote implementation, which may be
required for interoperability in some cases.)
</p>
<p>
You may not modify the headers from <em class="parameter"><code>func</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>callback function to run for each header. <span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>data to pass to <em class="parameter"><code>func</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupMessageHeadersIter"></a><h3>SoupMessageHeadersIter</h3>
<pre class="programlisting">typedef struct {
} SoupMessageHeadersIter;
</pre>
<p>
An opaque type used to iterate over a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><code class="literal">SoupMessageHeaders</code></a>
structure.
</p>
<p>
After intializing the iterator with
<a class="link" href="SoupMessageHeaders.html#soup-message-headers-iter-init" title="soup_message_headers_iter_init ()"><code class="function">soup_message_headers_iter_init()</code></a>, call
<a class="link" href="SoupMessageHeaders.html#soup-message-headers-iter-next" title="soup_message_headers_iter_next ()"><code class="function">soup_message_headers_iter_next()</code></a> to fetch data from it.
</p>
<p>
You may not modify the headers while iterating over them.
</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-iter-init"></a><h3>soup_message_headers_iter_init ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_message_headers_iter_init      (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html#SoupMessageHeadersIter" title="SoupMessageHeadersIter"><span class="type">SoupMessageHeadersIter</span></a> *iter</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>);</pre>
<p>
Initializes <em class="parameter"><code>iter</code></em> for iterating <em class="parameter"><code>hdrs</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>a pointer to a <a class="link" href="SoupMessageHeaders.html#SoupMessageHeadersIter" title="SoupMessageHeadersIter"><code class="literal">SoupMessageHeadersIter</code></a>
structure. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><code class="literal">SoupMessageHeaders</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-iter-next"></a><h3>soup_message_headers_iter_next ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_message_headers_iter_next      (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html#SoupMessageHeadersIter" title="SoupMessageHeadersIter"><span class="type">SoupMessageHeadersIter</span></a> *iter</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> **name</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> **value</code></em>);</pre>
<p>
Yields the next name/value pair in the <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><code class="literal">SoupMessageHeaders</code></a> being
iterated by <em class="parameter"><code>iter</code></em>. If <em class="parameter"><code>iter</code></em> has already yielded the last header,
then <a class="link" href="SoupMessageHeaders.html#soup-message-headers-iter-next" title="soup_message_headers_iter_next ()"><code class="function">soup_message_headers_iter_next()</code></a> will return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> and <em class="parameter"><code>name</code></em>
and <em class="parameter"><code>value</code></em> will be unchanged.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html#SoupMessageHeadersIter" title="SoupMessageHeadersIter"><code class="literal">SoupMessageHeadersIter</code></a>. <span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>pointer to a variable to return
the header name in. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>pointer to a variable to return
the header value in. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if another name and value were returned, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
if the end of the headers has been reached.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupEncoding"></a><h3>enum SoupEncoding</h3>
<pre class="programlisting">typedef enum {
	SOUP_ENCODING_UNRECOGNIZED,
	SOUP_ENCODING_NONE,
	SOUP_ENCODING_CONTENT_LENGTH,
	SOUP_ENCODING_EOF,
	SOUP_ENCODING_CHUNKED,
	SOUP_ENCODING_BYTERANGES
} SoupEncoding;
</pre>
<p>
How a message body is encoded for transport
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="SOUP-ENCODING-UNRECOGNIZED:CAPS"></a><span class="term"><code class="literal">SOUP_ENCODING_UNRECOGNIZED</code></span></p></td>
<td>unknown / error
</td>
</tr>
<tr>
<td><p><a name="SOUP-ENCODING-NONE:CAPS"></a><span class="term"><code class="literal">SOUP_ENCODING_NONE</code></span></p></td>
<td>no body is present (which is not the same as a
0-length body, and only occurs in certain places)
</td>
</tr>
<tr>
<td><p><a name="SOUP-ENCODING-CONTENT-LENGTH:CAPS"></a><span class="term"><code class="literal">SOUP_ENCODING_CONTENT_LENGTH</code></span></p></td>
<td>Content-Length encoding
</td>
</tr>
<tr>
<td><p><a name="SOUP-ENCODING-EOF:CAPS"></a><span class="term"><code class="literal">SOUP_ENCODING_EOF</code></span></p></td>
<td>Response body ends when the connection is closed
</td>
</tr>
<tr>
<td><p><a name="SOUP-ENCODING-CHUNKED:CAPS"></a><span class="term"><code class="literal">SOUP_ENCODING_CHUNKED</code></span></p></td>
<td>chunked encoding (currently only supported
for response)
</td>
</tr>
<tr>
<td><p><a name="SOUP-ENCODING-BYTERANGES:CAPS"></a><span class="term"><code class="literal">SOUP_ENCODING_BYTERANGES</code></span></p></td>
<td>multipart/byteranges (Reserved for future
use: NOT CURRENTLY IMPLEMENTED)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-get-encoding"></a><h3>soup_message_headers_get_encoding ()</h3>
<pre class="programlisting"><a class="link" href="SoupMessageHeaders.html#SoupEncoding" title="enum SoupEncoding"><span class="returnvalue">SoupEncoding</span></a>        soup_message_headers_get_encoding   (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>);</pre>
<p>
Gets the message body encoding that <em class="parameter"><code>hdrs</code></em> declare. This may not
always correspond to the encoding used on the wire; eg, a HEAD
response may declare a Content-Length or Transfer-Encoding, but
it will never actually include a body.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the encoding declared by <em class="parameter"><code>hdrs</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-set-encoding"></a><h3>soup_message_headers_set_encoding ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_message_headers_set_encoding   (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessageHeaders.html#SoupEncoding" title="enum SoupEncoding"><span class="type">SoupEncoding</span></a> encoding</code></em>);</pre>
<p>
Sets the message body encoding that <em class="parameter"><code>hdrs</code></em> will declare. In particular,
you should use this if you are going to send a request or response in
chunked encoding.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>encoding</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html#SoupEncoding" title="enum SoupEncoding"><span class="type">SoupEncoding</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-get-content-length"></a><h3>soup_message_headers_get_content_length ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="returnvalue">goffset</span></a>             soup_message_headers_get_content_length
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>);</pre>
<p>
Gets the message body length that <em class="parameter"><code>hdrs</code></em> declare. This will only
be non-0 if <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-encoding" title="soup_message_headers_get_encoding ()"><code class="function">soup_message_headers_get_encoding()</code></a> returns
<a class="link" href="SoupMessageHeaders.html#SOUP-ENCODING-CONTENT-LENGTH:CAPS"><code class="literal">SOUP_ENCODING_CONTENT_LENGTH</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the message body length declared by <em class="parameter"><code>hdrs</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-set-content-length"></a><h3>soup_message_headers_set_content_length ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_message_headers_set_content_length
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> content_length</code></em>);</pre>
<p>
Sets the message body length that <em class="parameter"><code>hdrs</code></em> will declare, and sets
<em class="parameter"><code>hdrs</code></em>'s encoding to <a class="link" href="SoupMessageHeaders.html#SOUP-ENCODING-CONTENT-LENGTH:CAPS"><code class="literal">SOUP_ENCODING_CONTENT_LENGTH</code></a>.
</p>
<p>
You do not normally need to call this; if <em class="parameter"><code>hdrs</code></em> is set to use
Content-Length encoding, libsoup will automatically set its
Content-Length header for you immediately before sending the
headers. One situation in which this method is useful is when
generating the response to a HEAD request; Calling
<a class="link" href="SoupMessageHeaders.html#soup-message-headers-set-content-length" title="soup_message_headers_set_content_length ()"><code class="function">soup_message_headers_set_content_length()</code></a> allows you to put the
correct content length into the response without needing to waste
memory by filling in a response body which won't actually be sent.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>content_length</code></em> :</span></p></td>
<td>the message body length</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupExpectation"></a><h3>enum SoupExpectation</h3>
<pre class="programlisting">typedef enum {
	SOUP_EXPECTATION_UNRECOGNIZED = (1 &lt;&lt; 0),
	SOUP_EXPECTATION_CONTINUE     = (1 &lt;&lt; 1)
} SoupExpectation;
</pre>
<p>
Represents the parsed value of the "Expect" header.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="SOUP-EXPECTATION-UNRECOGNIZED:CAPS"></a><span class="term"><code class="literal">SOUP_EXPECTATION_UNRECOGNIZED</code></span></p></td>
<td>any unrecognized expectation
</td>
</tr>
<tr>
<td><p><a name="SOUP-EXPECTATION-CONTINUE:CAPS"></a><span class="term"><code class="literal">SOUP_EXPECTATION_CONTINUE</code></span></p></td>
<td>"100-continue"
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-get-expectations"></a><h3>soup_message_headers_get_expectations ()</h3>
<pre class="programlisting"><a class="link" href="SoupMessageHeaders.html#SoupExpectation" title="enum SoupExpectation"><span class="returnvalue">SoupExpectation</span></a>     soup_message_headers_get_expectations
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>);</pre>
<p>
Gets the expectations declared by <em class="parameter"><code>hdrs</code></em>'s "Expect" header.
Currently this will either be <a class="link" href="SoupMessageHeaders.html#SOUP-EXPECTATION-CONTINUE:CAPS"><code class="literal">SOUP_EXPECTATION_CONTINUE</code></a> or
<a class="link" href="SoupMessageHeaders.html#SOUP-EXPECTATION-UNRECOGNIZED:CAPS"><code class="literal">SOUP_EXPECTATION_UNRECOGNIZED</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the contents of <em class="parameter"><code>hdrs</code></em>'s "Expect" header</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-set-expectations"></a><h3>soup_message_headers_set_expectations ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_message_headers_set_expectations
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessageHeaders.html#SoupExpectation" title="enum SoupExpectation"><span class="type">SoupExpectation</span></a> expectations</code></em>);</pre>
<p>
Sets <em class="parameter"><code>hdrs</code></em>'s "Expect" header according to <em class="parameter"><code>expectations</code></em>.
</p>
<p>
Currently <a class="link" href="SoupMessageHeaders.html#SOUP-EXPECTATION-CONTINUE:CAPS"><code class="literal">SOUP_EXPECTATION_CONTINUE</code></a> is the only known expectation
value. You should set this value on a request if you are sending a
large message body (eg, via POST or PUT), and want to give the
server a chance to reject the request after seeing just the headers
(eg, because it will require authentication before allowing you to
post, or because you're POSTing to a URL that doesn't exist). This
saves you from having to transmit the large request body when the
server is just going to ignore it anyway.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>expectations</code></em> :</span></p></td>
<td>the expectations to set</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-get-content-type"></a><h3>soup_message_headers_get_content_type ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        soup_message_headers_get_content_type
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> **params</code></em>);</pre>
<p>
Looks up the "Content-Type" header in <em class="parameter"><code>hdrs</code></em>, parses it, and returns
its value in *<em class="parameter"><code>content_type</code></em> and *<em class="parameter"><code>params</code></em>. <em class="parameter"><code>params</code></em> can be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you
are only interested in the content type itself.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>params</code></em> :</span></p></td>
<td>return location for the Content-Type parameters (eg, "charset"), or
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8 utf8][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a string with the value of the "Content-Type" header
or NULL if <em class="parameter"><code>hdrs</code></em> does not contain that header or it cannot be
parsed (in which case *<em class="parameter"><code>params</code></em> will be unchanged).</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-set-content-type"></a><h3>soup_message_headers_set_content_type ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_message_headers_set_content_type
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *params</code></em>);</pre>
<p>
Sets the "Content-Type" header in <em class="parameter"><code>hdrs</code></em> to <em class="parameter"><code>content_type</code></em>,
optionally with additional parameters specified in <em class="parameter"><code>params</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td>
<td>the MIME type</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>params</code></em> :</span></p></td>
<td>additional
parameters, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8 utf8]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-get-content-disposition"></a><h3>soup_message_headers_get_content_disposition ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_message_headers_get_content_disposition
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><span class="type">char</span> **disposition</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> **params</code></em>);</pre>
<p>
Looks up the "Content-Disposition" header in <em class="parameter"><code>hdrs</code></em>, parses it, and
returns its value in *<em class="parameter"><code>disposition</code></em> and *<em class="parameter"><code>params</code></em>. <em class="parameter"><code>params</code></em> can be
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you are only interested in the disposition-type.
</p>
<p>
In HTTP, the most common use of this header is to set a
disposition-type of "attachment", to suggest to the browser that a
response should be saved to disk rather than displayed in the
browser. If <em class="parameter"><code>params</code></em> contains a "filename" parameter, this is a
suggestion of a filename to use. (If the parameter value in the
header contains an absolute or relative path, libsoup will truncate
it down to just the final path component, so you do not need to
test this yourself.)
</p>
<p>
Content-Disposition is also used in "multipart/form-data", however
this is handled automatically by <a class="link" href="SoupMultipart.html" title="SoupMultipart"><span class="type">SoupMultipart</span></a> and the associated
form methods.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>disposition</code></em> :</span></p></td>
<td>return location for the
disposition-type, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>params</code></em> :</span></p></td>
<td>return
location for the Content-Disposition parameters, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8 utf8]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>hdrs</code></em> contains a "Content-Disposition"
header, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not (in which case *<em class="parameter"><code>disposition</code></em> and *<em class="parameter"><code>params</code></em>
will be unchanged).</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-set-content-disposition"></a><h3>soup_message_headers_set_content_disposition ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_message_headers_set_content_disposition
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *disposition</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *params</code></em>);</pre>
<p>
Sets the "Content-Disposition" header in <em class="parameter"><code>hdrs</code></em> to <em class="parameter"><code>disposition</code></em>,
optionally with additional parameters specified in <em class="parameter"><code>params</code></em>.
</p>
<p>
See <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-content-disposition" title="soup_message_headers_get_content_disposition ()"><code class="function">soup_message_headers_get_content_disposition()</code></a> for a discussion
of how Content-Disposition is used in HTTP.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>disposition</code></em> :</span></p></td>
<td>the disposition-type</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>params</code></em> :</span></p></td>
<td>additional
parameters, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8 utf8]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupRange"></a><h3>SoupRange</h3>
<pre class="programlisting">typedef struct {
	goffset start;
	goffset end;
} SoupRange;
</pre>
<p>
Represents a byte range as used in the Range header.
</p>
<p>
If <em class="parameter"><code>end</code></em> is non-negative, then <em class="parameter"><code>start</code></em> and <em class="parameter"><code>end</code></em> represent the bounds
of of the range, counting from 0. (Eg, the first 500 bytes would be
represented as <em class="parameter"><code>start</code></em> = 0 and <em class="parameter"><code>end</code></em> = 499.)
</p>
<p>
If <em class="parameter"><code>end</code></em> is -1 and <em class="parameter"><code>start</code></em> is non-negative, then this represents a
range starting at <em class="parameter"><code>start</code></em> and ending with the last byte of the
requested resource body. (Eg, all but the first 500 bytes would be
<em class="parameter"><code>start</code></em> = 500, and <em class="parameter"><code>end</code></em> = -1.)
</p>
<p>
If <em class="parameter"><code>end</code></em> is -1 and <em class="parameter"><code>start</code></em> is negative, then it represents a "suffix
range", referring to the last -<em class="parameter"><code>start</code></em> bytes of the resource body.
(Eg, the last 500 bytes would be <em class="parameter"><code>start</code></em> = -500 and <em class="parameter"><code>end</code></em> = -1.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> <em class="structfield"><code><a name="SoupRange.start"></a>start</code></em>;</span></p></td>
<td>the start of the range</td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> <em class="structfield"><code><a name="SoupRange.end"></a>end</code></em>;</span></p></td>
<td>the end of the range</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-get-ranges"></a><h3>soup_message_headers_get_ranges ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_message_headers_get_ranges     (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> total_length</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessageHeaders.html#SoupRange" title="SoupRange"><span class="type">SoupRange</span></a> **ranges</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> *length</code></em>);</pre>
<p>
Parses <em class="parameter"><code>hdrs</code></em>'s Range header and returns an array of the requested
byte ranges. The returned array must be freed with
<a class="link" href="SoupMessageHeaders.html#soup-message-headers-free-ranges" title="soup_message_headers_free_ranges ()"><code class="function">soup_message_headers_free_ranges()</code></a>.
</p>
<p>
If <em class="parameter"><code>total_length</code></em> is non-0, its value will be used to adjust the
returned ranges to have explicit start and end values, and the
returned ranges will be sorted and non-overlapping. If
<em class="parameter"><code>total_length</code></em> is 0, then some ranges may have an end value of -1,
as described under <a class="link" href="SoupMessageHeaders.html#SoupRange" title="SoupRange"><span class="type">SoupRange</span></a>, and some of the ranges may be
redundant.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>total_length</code></em> :</span></p></td>
<td>the total_length of the response body</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ranges</code></em> :</span></p></td>
<td>return location for an array of <a class="link" href="SoupMessageHeaders.html#SoupRange" title="SoupRange"><span class="type">SoupRange</span></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>the length of the returned array</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>hdrs</code></em> contained a "Range" header containing
byte ranges which could be parsed, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise (in which case
<em class="parameter"><code>range</code></em> and <em class="parameter"><code>length</code></em> will not be set).</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-set-ranges"></a><h3>soup_message_headers_set_ranges ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_message_headers_set_ranges     (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessageHeaders.html#SoupRange" title="SoupRange"><span class="type">SoupRange</span></a> *ranges</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> length</code></em>);</pre>
<p>
Sets <em class="parameter"><code>hdrs</code></em>'s Range header to request the indicated ranges. (If you
only want to request a single range, you can use
<a class="link" href="SoupMessageHeaders.html#soup-message-headers-set-range" title="soup_message_headers_set_range ()"><code class="function">soup_message_headers_set_range()</code></a>.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ranges</code></em> :</span></p></td>
<td>an array of <a class="link" href="SoupMessageHeaders.html#SoupRange" title="SoupRange"><span class="type">SoupRange</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>the length of <em class="parameter"><code>range</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-set-range"></a><h3>soup_message_headers_set_range ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_message_headers_set_range      (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> start</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> end</code></em>);</pre>
<p>
Sets <em class="parameter"><code>hdrs</code></em>'s Range header to request the indicated range.
<em class="parameter"><code>start</code></em> and <em class="parameter"><code>end</code></em> are interpreted as in a <a class="link" href="SoupMessageHeaders.html#SoupRange" title="SoupRange"><span class="type">SoupRange</span></a>.
</p>
<p>
If you need to request multiple ranges, use
<a class="link" href="SoupMessageHeaders.html#soup-message-headers-set-ranges" title="soup_message_headers_set_ranges ()"><code class="function">soup_message_headers_set_ranges()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start</code></em> :</span></p></td>
<td>the start of the range to request</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td>
<td>the end of the range to request</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-free-ranges"></a><h3>soup_message_headers_free_ranges ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_message_headers_free_ranges    (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupMessageHeaders.html#SoupRange" title="SoupRange"><span class="type">SoupRange</span></a> *ranges</code></em>);</pre>
<p>
Frees the array of ranges returned from <a class="link" href="SoupMessageHeaders.html#soup-message-headers-get-ranges" title="soup_message_headers_get_ranges ()"><code class="function">soup_message_headers_get_ranges()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ranges</code></em> :</span></p></td>
<td>an array of <a class="link" href="SoupMessageHeaders.html#SoupRange" title="SoupRange"><span class="type">SoupRange</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-get-content-range"></a><h3>soup_message_headers_get_content_range ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_message_headers_get_content_range
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> *start</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> *end</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> *total_length</code></em>);</pre>
<p>
Parses <em class="parameter"><code>hdrs</code></em>'s Content-Range header and returns it in <em class="parameter"><code>start</code></em>,
<em class="parameter"><code>end</code></em>, and <em class="parameter"><code>total_length</code></em>. If the total length field in the header
was specified as "*", then <em class="parameter"><code>total_length</code></em> will be set to -1.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start</code></em> :</span></p></td>
<td>return value for the start of the range</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td>
<td>return value for the end of the range</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>total_length</code></em> :</span></p></td>
<td>return value for the total length of the resource,
or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you don't care.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>hdrs</code></em> contained a "Content-Range" header
containing a byte range which could be parsed, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-message-headers-set-content-range"></a><h3>soup_message_headers_set_content_range ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_message_headers_set_content_range
                                                        (<em class="parameter"><code><a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a> *hdrs</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> start</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> end</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a> total_length</code></em>);</pre>
<p>
Sets <em class="parameter"><code>hdrs</code></em>'s Content-Range header according to the given values.
(Note that <em class="parameter"><code>total_length</code></em> is the total length of the entire resource
that this is a range of, not simply <em class="parameter"><code>end</code></em> - <em class="parameter"><code>start</code></em> + 1.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hdrs</code></em> :</span></p></td>
<td>a <a class="link" href="SoupMessageHeaders.html" title="SoupMessageHeaders"><span class="type">SoupMessageHeaders</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start</code></em> :</span></p></td>
<td>the start of the range</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td>
<td>the end of the range</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>total_length</code></em> :</span></p></td>
<td>the total length of the resource, or -1 if unknown</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
</div>
<div class="refsect1">
<a name="SoupMessageHeaders.see-also"></a><h2>See Also</h2>
<a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>